package com.hepinghospital.user.eventbus;

import java.io.Serializable;

/**
 * Created by Administrator on 2020/2/11.
 */

public class WebSocket implements Serializable {


    public WebSocket() {
    }

    private WebSocket(Builder builder) {
        this.content = builder.content;
        this.docId = builder.docId;
        this.diagnoseId = builder.diagnoseId;
        this.from = builder.from;
        this.to = builder.to;
        this.picType = builder.picType;
        this.src = builder.src;
        this.msgType = builder.msgType;
        this.eventFlag = builder.eventFlag;
        this.clientId = builder.clientId;
        this.time = builder.time;
    }

    public static final class Builder {
        public String createTime;
        public int roleType;
        public int chatType;
        public int msgType;
        public String docName;
        public String docAvatar;
        String docId;
        public String diagnoseId;
        public String from;
        public String to;
        public String content;
        public String src;
        public String picType;
        public String id;
        public int eventFlag = -1;// 0 接受 1 发送 2 会议 3 结束诊断 4 已读 5 通话中
        public String msgId;
        public String clientId;
        public int cmd;
        public int time;

        public Builder content(String val) {
            content = val;
            return this;
        }

        public Builder msgId(String val) {
            msgId = val;
            return this;
        }

        public Builder docId(String val) {
            docId = val;
            return this;
        }

        public Builder diagnoseId(String val) {
            diagnoseId = val;
            return this;
        }

        public Builder from(String val) {
            from = val;
            return this;
        }

        public Builder to(String val) {
            to = val;
            return this;
        }

        public Builder picType(String val) {
            picType = val;
            return this;
        }

        public Builder src(String val) {
            src = val;
            return this;
        }

        public Builder msgType(int val) {
            msgType = val;
            return this;
        }

        public Builder eventFlag(int val) {
            eventFlag = val;
            return this;
        }

        public Builder clientId(String val) {
            clientId = val;
            return this;
        }

        public Builder time(int val) {
            time = val;
            return this;
        }

        public Builder() {
        }

        public WebSocket build() {
            return new WebSocket( this );
        }
    }

    public String createTime;
    public int roleType;
    public int chatType;
    public String docName;
    public int msgType;
    public String docAvatar;
    public String docId;
    public String diagnoseId;
    public String preId;//处方id
    public String from;
    public String to;
    public String content;
    public String src;
    public String picType;
    public String id;
    public int eventFlag = -1;// 0 接受 1 发送 2 会议 3 结束诊断 4 已读 5 通话中
    public String msgId;
    public String clientId;
    public int cmd;
    public int time;
}
